<div>
    <h3>基本信息</h3>
    <div class="layui-table-modular">
        <table class="layui-hide" id="basicInfoTable" lay-filter="basicInfoTable" lay-skin="line"></table>
    </div>
</div>
<div>
    <h3>工作经历</h3>
    <div class="layui-table-modular">
        <table class="layui-hide" id="workExpTable" lay-filter="workExpTable" lay-skin="line"></table>
    </div>
</div>
<!-- 操作 -->
<script>
    layui.use(['form','table', 'element', 'utils'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            table = layui.table,
            form = layui.form,
            utils = layui.utils;

        // 数据快速查看
        var basicInfoTableIns = table.render({
            elem: '#basicInfoTable',
            url: 'api/candidateTable.json',
            method: 'post',
            contentType: 'application/json',
            headers: {"token": sessionStorage.getItem("token")},
            request: {
                pageName: 'pageIndex',
                limitName: 'pageSize'
            },
            response: {
                statusCode: 200
            },
            parseData: function(res){
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.total,
                    "data": res.data.records
                };
            },
            skin: 'line',
            cols: [
                [
                    {type: 'taskType', align: 'center', title: '字段'},
                    {field: 'taskObj', align: 'center', title: '现在信息'},
                    {field: 'taskRemaks', align: 'center', title: '原有信息'},
                    {field: 'taskTime', align: 'center', title: '操作人'},
                    {field: 'participant', align: 'center', title: '操作时间'}
                ]
            ]
        });
        var workExpTableIns = table.render({
            elem: '#workExpTable',
            url: 'api/candidateTable.json',
            method: 'post',
            contentType: 'application/json',
            headers: {"token": sessionStorage.getItem("token")},
            request: {
                pageName: 'pageIndex',
                limitName: 'pageSize'
            },
            response: {
                statusCode: 200
            },
            parseData: function(res){
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.total,
                    "data": res.data.records
                };
            },
            skin: 'line',
            cols: [
                [
                    {type: 'taskType', align: 'center', title: '字段'},
                    {field: 'taskObj', align: 'center', title: '现在信息'},
                    {field: 'taskRemaks', align: 'center', title: '原有信息'},
                    {field: 'taskTime', align: 'center', title: '操作人'},
                    {field: 'participant', align: 'center', title: '操作时间'}
                ]
            ]
        });
    });
</script>
